/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author bantch01
 */
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;




public class GraphicsPanel extends JPanel
{    
    private JPanel westPanel = new JPanel();
   // private JPanel centerPanel = new JPanel();
    private JPanel southPanel = new JPanel();
    private JPanel northPanel = new JPanel();
    private JPanel eastPanel = new JPanel();
    private JPanel searchPanel = new JPanel();
    private JPanel mainPanel = new JPanel();
    private JButton querySubmit;
    private JTable mainList;
    private JScrollPane listScrollPane;
    private JTextField searchBox;

    
    public GraphicsPanel(GraphicsFrame frame) 
    {
        super();
        this.add(mainPanel);
        mainPanel.setLayout(new BorderLayout());
        mainPanel.add(northPanel, BorderLayout.NORTH);
        //mainPanel.add(southPanel, BorderLayout.SOUTH);
        //mainPanel.add(eastPanel, BorderLayout.EAST);
        //mainPanel.add(westPanel, BorderLayout.WEST);
        northPanel.add(searchPanel);
        
        //SearchBox
        searchBox = new JTextField("Enter a Query",30);
        searchBox.addActionListener(new searchBoxListener());
        searchPanel.add(searchBox);
        
        //Submit Button
        querySubmit = new JButton("Submit Query");
        querySubmit.addActionListener(new queryButtonListener());
        searchPanel.add(querySubmit);
        
        //JTable
        mainList = new JTable(); 
        mainList.setAutoCreateRowSorter(true);
        listScrollPane = new JScrollPane(mainList);
        mainPanel.add(listScrollPane, BorderLayout.CENTER);

    }
    
    private class searchBoxListener implements ActionListener
    {
    	public searchBoxListener()
    	{
    		
    	}
    	public void actionPerformed(ActionEvent ae)
    	{
    		if(ae.getSource() == querySubmit)
            {
                
            }
    	}
    }
    
    
    
    private class queryButtonListener implements ActionListener 
    {

        public queryButtonListener() 
        {
               
        }
        
        public void actionPerformed(ActionEvent ae)
        {
            if(ae.getSource() == querySubmit)
            {
                
            }
        }
    }
}
